﻿<UserControl x:Class="Demos.Demo0003"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:win="clr-namespace:System.Windows;assembly=System.Windows.Controls"
    xmlns:controls="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls"
    xmlns:controlsToolkit="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Toolkit">
    <Grid>
        <Grid.ColumnDefinitions>
            <ColumnDefinition/>
            <ColumnDefinition/>
        </Grid.ColumnDefinitions>

        <!--<controlsToolkit:ListBoxDragDropTarget AllowDrop="true">-->
            <ListBox x:Name="fromListBox" SelectionMode="Extended" DisplayMemberPath="Name"
                     Width="400" Height="400" AllowDrop="true">
                <ListBox.ItemsPanel>
                    <ItemsPanelTemplate>
                        <StackPanel Orientation="Vertical" />
                    </ItemsPanelTemplate>
                </ListBox.ItemsPanel>
            </ListBox>
        <!--</controlsToolkit:ListBoxDragDropTarget>-->

        <controlsToolkit:TreeViewDragDropTarget
            Grid.Column="1" AllowDrop="true">
            <controlsToolkit:TreeViewDragDropTarget.Resources>
                <win:HierarchicalDataTemplate x:Key="hierarchicalTemplate" ItemsSource="{Binding Reports}">
                    <TextBlock Text="{Binding Name}" />
                </win:HierarchicalDataTemplate>
            </controlsToolkit:TreeViewDragDropTarget.Resources>
            <controls:TreeView x:Name="treeView"
                               ItemTemplate="{StaticResource hierarchicalTemplate}"
                               Width="400" Height="400"/>
        </controlsToolkit:TreeViewDragDropTarget>

    </Grid>
</UserControl>